import { getLocalStorage } from '@/storage'

export const ReportModule = (props: {
    moduleKey: string
    children: React.ReactNode | (() => JSX.Element)
}) => {
    let options: string[] = (getLocalStorage('GENERATE_OPTIONS') as string[]) ?? []
    if (!options?.some(item => item === props.moduleKey)) return null
    return <>{props.children}</>
}
